Skip to content

Conversation

@NOVAXIM
Copy link
Contributor

@NOVAXIM NOVAXIM commented Nov 25, 2025

Explanation

These changes are intended to calculate the correct number of layers when slicing a model before printing. This only works in specific scenario where the Initial Layer Height is different than the Layer Height. In addition to the correct calculation, we obtain the correct layers result on the slider.

Note

Most users don't notice the issue because Initial Bottom Layers is not shown by default (even in Expert settings) and even fewer users check these values.

Important

Please note that the calculation of the number of layers is always based on the layer thickness value.

Description of changes

Line 1739: The formula for calculating the number of Initial Bottom Layers shows the correct values finally.
Line 3766: the formula "* 30 / 60" is easier to write as "/ 2"
Line 7269: the formula "/ 60 * 30" is easier to write as "/ 2"

Type of change

  • Printer definition file(s)
  • Bug fix (non-breaking change which fixes an issue)
  • Clean up

How Has This Been Tested?

  • Tested with Cura version 5.11.0 and previous. Working well.

@github-actions github-actions bot added the PR: Community Contribution 👑 Community Contribution PR's label Nov 25, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

Test Results

24 520 tests  ±0   24 516 ✅ ±0   49s ⏱️ +3s
     1 suites ±0        2 💤 ±0 
     1 files   ±0        2 ❌ ±0 

For more details on these failures, see this check.

Results for commit e5f1669. ± Comparison against base commit 1508c61.

♻️ This comment has been updated with latest results.

Copy link
Member

@rburema rburema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me; I'll pass it onto QA
thanks for the contrib

@HellAholic
Copy link
Contributor

Did a round of testing, found couple of edge cases that based on experience and the way profiles are set, the first one is considered as a blocker.
So the formula can return either a 0 or a negative number which will causes scenarios such as the following

  • Initial layers is calculated as 0 [Blocker as users might not even notice the change and end up without the bottom layer]
image - Negative value is returned [unable to slice message prevents a print fail, as the field falls below the minimum value, so a critical rather than a blocker] image

If you could take a look and adjust the formula to also consider those situations that would be great.

@NOVAXIM
Copy link
Contributor Author

NOVAXIM commented Jan 25, 2026

Interesting observations. I'll look into this and respond soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Community Contribution 👑 Community Contribution PR's

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants